package cn.lil.service;

import cn.lil.dao.OrderItemDao;
import cn.lil.model.OrderItem;
import cn.lil.utils.DataSourceUtils;
import org.apache.commons.dbutils.QueryRunner;
import org.apache.commons.dbutils.handlers.BeanListHandler;

import java.sql.SQLException;
import java.util.List;

public class OrderItemService {
    private OrderItemDao orderItemDao = new OrderItemDao();

    public List<OrderItem> getItemByOrderId(int orderId) throws SQLException {
        return orderItemDao.getItemByOrderId(orderId);
    }

    public List<OrderItem> getItemById(int id) throws SQLException {
        return orderItemDao.getItemById(id);
    }
}
